<?php
	$title = '';
	foreach ($dirTree as $node) $title .= "$node[name] » ";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" href="<?php echo $css ?>style.css" type="text/css" media="screen" />
	<title><?php echo $siteName ?> :: <?php echo $title ?></title>
</head>
<body>
<div id="page">
	<div id="header">
		<h1><a href="<?php echo $this->root ?>"><?php echo $siteName ?></a></h1>

		<div id="navigation">
		<?php foreach ($dirTree as $item) { ?>
			<a href="<?php echo $item['path'] ?>"><?php echo $item['name'] ?></a> »
		<?php } ?>
		</div>
	</div>

	<div id="main">
	<?php
		$i = 1;
		foreach ($photos as $photo) {
			if ($photo['type'] == 'dir') {
	?>
			<a href="<?php echo $photo['path'] ?>" class="item dir">
				<span><?php echo $photo['name'] ?></span>
			</a>
	<?php		} else { ?>
			<a href="<?php echo $photo['path'] ?>" class="item photo">
				<img src="<?php echo $photo['thumb'] ?>" />
				<span><?php echo $photo['name'] ?></span>
			</a>
	<?php
			}
			
			if ($i++ % 6 == 0) {
				echo '<br style="clear: left" />';
			}
		}
	?>
	<br style="clear: left" /><br />
	</div>
</div>
</body>
</html>